<?php

/* @var $this yii\web\View */

use yii\helpers\Html;
use yii\widgets\ActiveForm;

$this->title = '设置推荐奖';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="page-title">
  <div>
    <h1><i class="fa fa-trophy"></i> 设置推荐奖</h1>
    <p style="font-style:normal;">推荐一个一级会员提成</p>
  </div>
  <!--div style="width:300px;">
    <ul class="breadcrumb">
      <li><i class="fa fa-home fa-lg"></i></li>
      <li><a href="#">推荐奖</a></li>
    </ul>
  </div-->
</div>

<!-- page body start-->
<div class='card'>
<?php $form = ActiveForm::begin(); ?>
    <?php
      if(isset($tip)&&$tip===true){
        if($model->hasErrors()){
    ?>
          <div class="alert alert-danger" role="alert">
            <?php
                foreach($model->getErrors("") as $key=>$value){
                  echo $value."<br>";
                }
            ?>
          </div>
    <?php
        }else{
    ?>
          <div class="alert alert-success" role="alert">更新成功！</div>
    <?php
        }
      }
    ?>
    <?= $form->field($model, 'rate')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'0.9{1,4}'])->label('提成比例') ?>
    <button type="submit" class="btn btn-warning">提交</button>
<?php ActiveForm::end(); ?>
</div>
<!-- page body end-->
